const BaseCom = resolve => {
        require.ensure(['../../BaseCom'], () => {
            resolve(require('../../BaseCom'))
        })
    }
    //任务中心
    //当日任务
    //import ToDayTaskCom from './components/ToDayTaskCom'
const ToDayTaskCom = resolve => {
        require.ensure(['./components/ToDayTaskCom'], () => {
            resolve(require('./components/ToDayTaskCom'))
        })
    }
    //月度任务
    //import MonthTaskCom from './components/MonthTaskCom'
const MonthTaskCom = resolve => {
        require.ensure(['./components/MonthTaskCom'], () => {
            resolve(require('./components/MonthTaskCom'))
        })
    }
    //任务预生成
    //import BeforeTaskCom from './components/BeforeTaskCom'
const BeforeTaskCom = resolve => {
        require.ensure(['./components/BeforeTaskCom'], () => {
            resolve(require('./components/BeforeTaskCom'))
        })
    }
    //任务管理
    //import taskManageCom from './components/taskManageCom'
const taskManageCom = resolve => {
    require.ensure(['./components/taskManageCom'], () => {
        resolve(require('./components/taskManageCom'))
    })
}

// 定义子模块路由
const taskRoutes = [{
    path: 'task',
    component: BaseCom,
    children: [
        //当天任务
        {
            path: 'day',
            component: ToDayTaskCom
        },
        //月度任务
        {
            path: 'month',
            component: MonthTaskCom
        },
        //任务预生成
        {
            path: 'before',
            component: BeforeTaskCom
        },
        //任务管理
        {
            path: 'manage',
            component: taskManageCom
        },
    ]
}]

export default taskRoutes